#include "mock_file.h"
#include "main.h"

namespace VERGE1 {

    void MockFile::validate_mock_stream() {
        if (!this->mock_stream) {
            err("mock stream is null");
        }
    }
            
    MockFile::MockFile()
    : mock_stream(0) {
        this->mock_stream = new std::stringstream();
    }
    
    MockFile::~MockFile() {
        validate_mock_stream();
        delete this->mock_stream;
        this->mock_stream = 0;
    }
    
    void MockFile::reset() {
        validate_mock_stream();
        this->mock_stream->seekg(0);
    }
}
